#修改后的第二次
import time

def outer(func):
    def wapper(*args,**kwargs):
        #logging.conf、保留原功能
        #2、增加新功能，登录认证
        while True:
            name=input("请输入用户名")
            password=str(input("请输入密码"))
            if name=='liangchen' and password=='123456':
                res=func(*args,**kwargs)
                return res
                break
            else:
                print('输入错误请重新输入')
                continue

    return wapper


# @outer
# def index(x,y,z):
#     time.sleep(3)
#     print('index %s %s %s' %(x,y,z))
# index(logging.conf,2,3)

@outer
def home(name):
    time.sleep(2)
    print('welcome %s to home page'%name)
    return 12345
home('liangchen')

